package com.third.customer.model.dao;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.third.customer.model.dao.param.CustomerGroupParam;
import com.third.customer.model.tables.CustomerGroup;

import java.util.List;
import java.util.Optional;

/**
 * Created by hehuaichun on 2020/5/21.
 */
public interface CustomerGroupDao {

    Page<CustomerGroup> query(CustomerGroupParam param);

    Optional<CustomerGroup> getById(long companyId, Long groupId);

    List<CustomerGroup> getByIds(long companyId,List<Long> groupIds);

    List<CustomerGroup> getByCompanyId(long companyId);

    Optional<CustomerGroup> getByName(Long companyId, String groupName);

    boolean insert(CustomerGroup group);

    boolean update(CustomerGroup group);

    boolean delete(Long id);
}
